<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Retrieve printer configuration data</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.printer-end-page.html">printer_end_page</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.printer-list.html">printer_list</a></div>
 <div class="up"><a href="ref.printer.html">Printer 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.printer-get-option" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">printer_get_option</h1>
  <p class="verinfo">(PECL printer SVN)</p><p class="refpurpose"><span class="refname">printer_get_option</span> &mdash; <span class="dc-title">Retrieve printer configuration data</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.printer-get-option-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <span class="methodname"><strong>printer_get_option</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$printer_handle</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$option</code></span>
   )</div>

  <p class="para rdfs-comment">
   The function retrieves the configuration setting of <em><code class="parameter">option</code></em>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.printer-get-option-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">printer_handle</code></em></dt>

     <dd>

      <p class="para">
       <em><code class="parameter">printer_handle</code></em> must be a valid handle to a
       printer.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">option</code></em></dt>

     <dd>

      <p class="para">
       Take a look at <span class="function"><a href="function.printer-set-option.html" class="function">printer_set_option()</a></span> for the settings that can
       be retrieved, additionally the following settings can be retrieved:
       <ul class="itemizedlist">
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_DEVICENAME</code></strong>
          returns the devicename of the printer.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_DRIVERVERSION</code></strong>
          returns the printer driver version.
         </span>
        </li>
       </ul>
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.printer-get-option-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns the value of <em><code class="parameter">option</code></em>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.printer-get-option-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-5255">
    <p><strong>Example #1 <span class="function"><strong>printer_get_option()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$handle&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">printer_open</span><span style="color: #007700">();<br />echo&nbsp;</span><span style="color: #0000BB">printer_get_option</span><span style="color: #007700">(</span><span style="color: #0000BB">$handle</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">PRINTER_DRIVERVERSION</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">printer_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$handle</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>

 
</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.printer-end-page.html">printer_end_page</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.printer-list.html">printer_list</a></div>
 <div class="up"><a href="ref.printer.html">Printer 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
